fix(#768): stringify NaN as empty string per XForms spec#770
Open
latin-panda wants to merge 4 commits intomainfrom
Open
fix(#768): stringify NaN as empty string per XForms spec#770latin-panda wants to merge 4 commits intomainfrom
latin-panda wants to merge 4 commits intomainfrom
Conversation
🦋 Changeset detectedLatest commit: 6a77007 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Collaborator
Author
|
@sadiqkhoja, do you have a chance to review this PR? It's small. |
Contributor
|
sure |
Member
|
@sadiqkhoja please consider #768 (comment) before diving in deep! |
Contributor
|
certainly |
latin-panda
commented
Apr 8, 2026
| { seed: NaN, expected: 'CBEAFD' }, | ||
| { seed: Infinity, expected: 'CBEAFD' }, | ||
| { seed: -Infinity, expected: 'CFBEAD' }, | ||
| { seed: -Infinity, expected: 'CBEAFD' }, |
Collaborator
Author
There was a problem hiding this comment.
The old test expected 'CFBEAD' because we were incorrectly stringifying NaN as "NaN" and hashing it. The fix correctly stringifies NaN as "", which maps to seed 0 → 'CBEAFD'.
Collaborator
Author
|
@sadiqkhoja This is ready for review. I think the solution is more straightforward than before. :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #768
I have verified this PR works in these browsers (latest versions):
What else has been done to verify that this works as intended?
Screen.Recording.2026-04-07.at.10.24.26.PM.mov
Why is this the best possible solution? Were any other approaches considered?
How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?
Do we need any specific form for testing your changes? If so, please attach one.
What's changed